import request from '@/utils/request'

export function loginByUsername(data) {
  return request({
    url: '/login',
    method: 'post',
    data
  })
}

// 获取验证码
export function getCaptchaCode(params) {
  return request({
    url: '/captcha',
    method: 'get',
    params
  })
}
// 用户修改登录密码
export function editPassword(data) {
  return request({
    url: '/user/edit_user_password',
    method: 'put',
    data
  })
}
// 注销
export function logout() {
  return request({
    url: '/logout',
    method: 'post'
  })
}

export function getUserInfo(params) {
  return request({
    url: '/user/get_user_info',
    method: 'get',
    params
  })
}

export function wfxLogin(data) {
  return request({
    url: '/wfx_login',
    method: 'post',
    data
  })
}
// 获取微聊配置信息
export function getMiniChatOption(params) {
  return request({
    url: '/plug/getMicroChatInfo',
    method: 'get',
    params
  })
}
